x86 sysctl: Remove unused CPU hotplug status stuff.
authorKeir Fraser <keir@xen.org>
Fri, 14 Jan 2011 14:07:39 +0000 (14:07 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 14 Jan 2011 14:07:39 +0000 (14:07 +0000)
Signed-off-by: Keir Fraser <keir@xen.org>
xen/arch/x86/sysctl.c
xen/include/public/sysctl.h

index ac7b56a29b1154c05c29473d9590318075940084..7bd20b9d0ddcef2ccd09cdcea9202169228e9a8c 100644 (file)
@@ -41,7 +41,7 @@ extern int __node_distance(int a, int b);
 long arch_do_sysctl(
     struct xen_sysctl *sysctl, XEN_GUEST_HANDLE(xen_sysctl_t) u_sysctl)
 {
-    long ret = 0, status;
+    long ret = 0;
 
     switch ( sysctl->cmd )
     {
@@ -167,41 +167,19 @@ long arch_do_sysctl(
     {
         unsigned int cpu = sysctl->u.cpu_hotplug.cpu;
 
-        if (cpu_present(cpu)) {
-            status = cpu_online(cpu) ? XEN_CPU_HOTPLUG_STATUS_ONLINE :
-                XEN_CPU_HOTPLUG_STATUS_OFFLINE;
-        } else {
-            status = -EINVAL;
-        }
-
         switch ( sysctl->u.cpu_hotplug.op )
         {
         case XEN_SYSCTL_CPU_HOTPLUG_ONLINE:
             ret = cpu_up(cpu);
-            /*
-             * In the case of a true hotplug, this CPU wasn't present
-             * before, so return the 'new' status for it.
-             */
-            if (ret == 0 && status == -EINVAL)
-                status = XEN_CPU_HOTPLUG_STATUS_NEW;
             break;
         case XEN_SYSCTL_CPU_HOTPLUG_OFFLINE:
             ret = continue_hypercall_on_cpu(
                 0, cpu_down_helper, (void *)(unsigned long)cpu);
             break;
-        case XEN_SYSCTL_CPU_HOTPLUG_STATUS:
-            ret = 0;
-            break;
         default:
             ret = -EINVAL;
             break;
         }
-
-        /*
-         * If the operation was successful, return the old status.
-         */
-        if (ret >= 0)
-            ret = status;
     }
     break;
 
index d4bbc57cae36190c9fd621b138c06adb4672e6fe..ac7551701b9894ef3244f99f30c2c03200f782ee 100644 (file)
@@ -253,21 +253,12 @@ struct xen_sysctl_get_pmstat {
 typedef struct xen_sysctl_get_pmstat xen_sysctl_get_pmstat_t;
 DEFINE_XEN_GUEST_HANDLE(xen_sysctl_get_pmstat_t);
 
-/*
- * Status codes. Must be greater than 0 to avoid confusing
- * sysctl callers that see 0 as a plain successful return.
- */
-#define XEN_CPU_HOTPLUG_STATUS_OFFLINE 1
-#define XEN_CPU_HOTPLUG_STATUS_ONLINE  2
-#define XEN_CPU_HOTPLUG_STATUS_NEW     3
-
 /* XEN_SYSCTL_cpu_hotplug */
 struct xen_sysctl_cpu_hotplug {
     /* IN variables */
     uint32_t cpu;   /* Physical cpu. */
 #define XEN_SYSCTL_CPU_HOTPLUG_ONLINE  0
 #define XEN_SYSCTL_CPU_HOTPLUG_OFFLINE 1
-#define XEN_SYSCTL_CPU_HOTPLUG_STATUS 2
     uint32_t op;    /* hotplug opcode */
 };
 typedef struct xen_sysctl_cpu_hotplug xen_sysctl_cpu_hotplug_t;